/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db.interfaces;

import core.Course;
import core.Program;
import core.User;
import java.util.Collection;

/**
 *
 * @author Anton
 */
public interface UserDAO
{
    User getUserByUserId(long id);
    User getUserByEmail(String email);

    Collection<User> searchForUsersByEmail(String beginsWith);
    Collection<User> searchForUsersByFName(String beginsWith);
    Collection<User> searchForUsersByLName(String beginsWith);
    Collection<User> searchForUsersByParameters(String beginsWith, String fieldName, boolean asc);
    Collection<User> getUsersByFName(String fname);
    Collection<User> getUsersByLName(String lname);
    Collection<User> getAllUsers();

    boolean addProgramToUser(User user, Program program);
    boolean deleteProgramFromUser(User user, Program program);

    boolean addCourseToUser(User user, Course course);
    boolean deleteCourseFromUser(User user, Course course);
  
    boolean containsUser(String email); //TODO Remove?
    boolean containsUser(User user);
    boolean addUser(User user);
    boolean editUser(User user);
    boolean deleteUser(User user);
}
